﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using Services.Contracts;
using SS.GoogleTranslation;

namespace Services.Implementation
{
    [Export(typeof(ITranslator)), PartCreationPolicy(CreationPolicy.NonShared)]
    public class Translator : ITranslator
    {
        readonly GoogleTranslator _googleTranslator = new GoogleTranslator();

        string ITranslator.Translate(string phrase)
        {
            return _googleTranslator.TranslateText(phrase, "German", "English");
        }
    }
}
